package com.itheima.ZuoYe06;

import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {
    Student s = getStudent();
        System.out.println(s.getName()+" "+s.getSex()+" "+s.getAge());
    }
    public static Student getStudent(){
        Student stu = new Student();
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学员姓名：");
        stu.setName(sc.next());
        System.out.println("请输入学员姓别：");
        stu.setSex(sc.next());
        System.out.println("请输入学员年龄：");
        stu.setAge(sc.nextInt());
        return stu;
    }

}
